<!DOCTYPE html>
<html lang="en">
<head>
    <!--
    @Author 硕鼠
    @Date 2020/4/18 19:55
    @Version 1.0
    @Description 文件说明
  -->
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-3.4.1.min.js"></script>
    <script>
        $(function () {
            $('#btn1').click(function () {
               console.log($('li').first().text());//A1
               console.log($('li').eq(4).text()); //A5
               console.log($('li').filter('.style').text()); //A4

            });

        });
    </script>
</head>
<body>
<div>
    <ul>
        <li>A1</li>
        <li>A2</li>
        <li>A3</li>
        <li id="a4" class="style">A4</li>
        <li>A5</li>
        <li>A6</li>
        <li>A7</li>
        <li id="a8">A8</li>
    </ul>
</div>
<div id="result">

</div>
<div>
    <input type="button" value="点击" id="btn1">
</div>
</body>
</html>